package creator.factory;

import creator.factory.resources.Resources;
import creator.factory.soldier.Solider;
import creator.factory.soliderfamily.ShuGuoSolider;
import creator.factory.soliderfamily.WeiGuoSolider;
import creator.factory.soliderfamily.WuGuoSolider;
import creator.factory.wujiang.Wujiang;
import creator.factory.wujiangfamily.WeiGuoWujiang;
import creator.factory.wujiangfamily.WuGuoWujiang;

public class SanGuoFigureFactory extends FigureAbstractFactory{

    public static final String WU_GUO = "1";
    public static final String SHU_GUO = "2";
    public static final String WEI_GUO = "3";

    @Override
    public Wujiang createWujiang(String type) {
        if (WU_GUO.equals(type)){
            return new WuGuoWujiang();
        }
        if (WEI_GUO.equals(type)){
            return new WeiGuoWujiang();
        }
        if (SHU_GUO.equals(type)){

        }
       throw new RuntimeException("无对应实现类");
    }

    @Override
    public Solider createSolider(String type) {
        if (WU_GUO.equals(type)){
            return new WuGuoSolider();
        }
        if (WEI_GUO.equals(type)){
            return new WeiGuoSolider();
        }
        if (SHU_GUO.equals(type)){
            return new ShuGuoSolider();
        }
        throw new RuntimeException("无对应实现类");

    }

    @Override
    public Resources createResources(String type) {
        Resources resources = new Resources();
        resources.setFoodstuff("100000");
        resources.setLoad("100");
        resources.setWater("100000");
        return resources;
    }
}
